package com.yang.factory;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext ioc = new FileSystemXmlApplicationContext("C:\\Users\\yang\\Desktop\\spring\\spring\\src\\com\\yang\\factory\\factory.xml");
        Car car = (Car) ioc.getBean("car1");
        System.out.println(car);
        System.out.println("-----------------------------------");
        Car car2 = (Car) ioc.getBean("car2");
        System.out.println(car2);
    }
}
